home *** CD-ROM | disk | FTP | other *** search
/ Turn the Power On! 2 / Turn the Power On! HP Workstations Volume II (HP) (1994).ISO / poweron-ii < prev   
Text File  |  1994-02-22  |  2KB  |  101 lines

  1. #!/bin/ksh
  2. set +u 
  3. arg0=$0
  4. PWD=`pwd`
  5. umask a=rwx
  6.  
  7. DIR=`dirname $arg0`
  8. BASE=`basename $arg0`
  9.  
  10. if [ $DIR = "." ]
  11. then
  12.     PATH_NAME=${PWD}/lib/${BASE}/
  13. else
  14.     PATH_NAME=${DIR}/lib/${BASE}/
  15. fi
  16.  
  17. LANGU=${LANG:=american}
  18. case ${LANGU} in
  19.     american ) ;;
  20.     japanese ) ;;
  21.     japanese.euc ) LANGU=japanese ;;
  22.     katakana ) LANGU=japanese ;;
  23.     chinese-t ) ;;
  24.     chinese-s ) LANGU=chinese-t ;;
  25.     korean ) ;;
  26.     * ) LANGU=american ;;
  27. esac
  28.  
  29. if [ ! -d $PATH_NAME${LANGU} ]
  30. then
  31.     LANGU=american
  32. fi
  33.  
  34. echo @DEMO_HOME > /tmp/poweronii_vars
  35. echo  ${PATH_NAME} >> /tmp/poweronii_vars
  36. echo @LANGUAGE >> /tmp/poweronii_vars
  37. echo  ${LANGU}/ >> /tmp/poweronii_vars
  38.  
  39. MP=${PATH_NAME}../../bin/Mpresent
  40. export SHLIB_PATH=${PATH_NAME}../../lib/misc
  41. if [ -x /usr/audio/bin/send_sound ]
  42.    then
  43.       export SendAudio=/usr/audio/bin/send_sound
  44.    elif [ -x /usr/audio/bin/acontrol ]
  45.    then
  46.       export SendAudio=${PATH_NAME}../../bin/send_sound
  47. fi
  48.  
  49. cd ${PATH_NAME}
  50.  
  51. ../../bin/ilcolors 0 &
  52. IL_PID=$!
  53. sleep 1
  54. kill -0 $IL_PID 2>/dev/null
  55. IL_STAT=$?
  56. if [ 0 -ne ${IL_STAT} ]
  57.     then
  58.         /usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m  \
  59. "  There are not enough colors 
  60.    available for this demo to run
  61.    correctly.  Please stop some
  62.    applications and try again." 
  63.         exit 1
  64. fi
  65.  
  66. trap " kill $IL_PID ; ../../bin/kfork drive_server ; rm -f /tmp/poweron_vars /tmp/windows.dbf ; exit " 2 3 15
  67.  
  68. /usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m  \
  69. "  
  70. Welcome to Turn the PowerON II
  71.  
  72.  Loading the Demo from disk.
  73.  
  74.         Please wait" &
  75. XWD_PID=$!
  76. cover/cache.ksh
  77.  
  78. PATH=$PATH:.
  79. DISPLAY=${DISPLAY:=local:0}
  80. export SB_710_VM_DB=TRUE
  81. export AIM_VAR=$PATH_NAME
  82.  
  83. if [ -x /usr/audio/bin/AudioCP ]
  84.    then
  85.       /usr/audio/bin/AudioCP -geometry +0-1&
  86.    elif [ -x /usr/audio/bin/acontrol ]
  87.       then
  88.          /usr/audio/bin/acontrol -geometry +0-1&
  89. fi
  90. ACP=$!
  91. kill $XWD_PID 2>/dev/null
  92. $MP ${PATH_NAME}poweron-ii.iw
  93.  
  94. kill $IL_PID 2>/dev/null
  95. kill $ACP
  96. ../../bin/kfork drive_server
  97. ../../bin/kfork send_sound
  98. ../../bin/kfork mplay
  99. ../../bin/kfork cover.ksh
  100. rm -f /tmp/poweron_vars /tmp/windows.dbf
  101.